Skip to main content

publicholiday

Table: publicholiday​

The publicholiday table stores information about official public holidays.
It is used to manage holiday schedules and track related metadata.


Columns​

Column NameData TypeConstraintsDescription
publicHolidayIdint(11)NOT NULL, PRIMARY KEY, AUTO_INCREMENTUnique identifier for each public holiday
createdDatedatetimeDEFAULT NULLTimestamp when the record was created
startDatedateDEFAULT NULLStart date of the public holiday
holidayReasonvarchar(30)DEFAULT NULLReason for the holiday
holidayTypevarchar(30)DEFAULT NULLType or category of the holiday
lastEditedDatedatetimeDEFAULT NULLTimestamp when the record was last edited
createdByUserIdint(11)DEFAULT NULLUser who created the record
editedByUserIdint(11)DEFAULT NULLUser who last edited the record
voidedint(11)DEFAULT '0'Flag indicating if the holiday is voided (1) or active (0)
endDatedateDEFAULT NULLEnd date of the public holiday
locationIdint(11)DEFAULT NULLLocation associated with the holiday

Indexes​

  1. PRIMARY - Primary key on publicHolidayId
  2. publicholiday_editedByUserId_fk - Index on editedByUserId
  3. publicholiday_createdByUserId_fk - Index on createdByUserId
  4. ph_locationId_location_locationId_FK - Index on locationId

Foreign Key Relations​

createdByUserId → user.mappedId​

editedByUserId → user.mappedId​

locationId → location.locationId​

---​

Usage Notes​

  • Tracks public holidays for scheduling and reporting purposes.
  • startDate and endDate define the holiday duration.
  • voided indicates inactive or canceled holidays.
  • Linked to location and user tables for contextual information.